import { GSprite } from "../../../../../com/mui/controls/GSprite";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { FontUtil } from "../../../../common/font/FontUtil";
import { Language } from "../../../../../extend/language/Language";
import { EliteMapStateCellRenderer } from "./EliteMapStateCellRenderer";
import { DataProvider } from "../../../../../fl/data/DataProvider";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { GTileList } from "../../../../../com/mui/controls/GTileList";
//class EliteFloorDetailPanel
    
    export  class EliteFloorDetailPanel extends GSprite
    {
        constructor()
        {
            super();
            ObjCreate.createBg(0, 0, 283, 451, this);
            ObjCreate.createBg(20, 170, 243, 2, this, ImagesConst.SplitLine);
            ObjCreate.createBg(20, 335, 243, 2, this, ImagesConst.SplitLine);
            var loc1=GlobalStyle.setTextFormatLeading(GlobalStyle.textFormat6, 5);
            loc1.font = FontUtil.stXingkaiName;
            loc1.size = 18;
            loc1.color = 16776960;
            this._txtbm = ObjCreate.createBitmap(null, 10, 178, this);
            this.onResLoaded();
            loc1.font = FontUtil.defaultName;
            loc1.size = 12;
            loc1.color = GlobalStyle.color1Uint;
            loc1.align = flash.text.TextFormatAlign.CENTER;
            ObjCreate.createGTextField(Language.getString(60610), 0, 310, 283, 20, this, loc1, true, false);
            this._mapsList = ObjCreate.createTileList(15, 204, 270, 120, this);
            this._mapsList.columnWidth = 130;
            this._mapsList.rowHeight = 28;
            this._mapsList.setStyle("cellRenderer", EliteMapStateCellRenderer);
            this._dp = new DataProvider();
            this._mapsList.dataProvider = this._dp;
            return;
        }

        public onResLoaded(): void
        {
            if (GlobalClass.hasRes(ImagesConst.guildEliteText_bcjsxq)) 
            {
                this._txtbm.bitmapData = GlobalClass.getBitmapData(ImagesConst.guildEliteText_bcjsxq);
            }
            return;
        }

        public updateMapsStatus(arg1: Array<any>): void
        {
            this._dp.removeAll();
            this._dp.addItems(arg1);
            this._mapsList.dataProvider = this._dp;
            return;
        }

        /* internal */ /* var */_dp: DataProvider;

        /* internal */ /* var */_mapsList: GTileList;

        /* internal */ /* var */_txtbm: Object /* flash.display.Bitmap */;
    }
